Skip to content

Conversation

@hauntsaninja
Copy link
Collaborator

Fixes #17819

@github-actions

This comment has been minimized.

@hauntsaninja
Copy link
Collaborator Author

Great, of course the tests fail!

@JukkaL
Copy link
Collaborator

JukkaL commented Sep 25, 2024

It looks like the errors coming from CPython and psutil?

python: Objects/typeobject.c:3129: _PyType_Lookup: Assertion `!PyErr_Occurred()' failed.
...
ImportError: /home/runner/work/mypy/mypy/.tox/py/lib/python3.8/site-packages/psutil/_psutil_linux.abi3.so: undefined symbol: PyModule_Create2

I wonder if the tests would pass on a Python 3.9 debug build (or on an even more recent Python).

@JelleZijlstra
Copy link
Member

The first error is from here: https://github.com/python/cpython/blob/63e54e6d4227e7cbdbb2a0ea69d11a904951f3a9/Objects/typeobject.c#L3129. This likely means we're calling _PyType_Lookup while there is an active exception; most C API functions don't support that.

I don't know what the psutil error is about. My first thought was that the release and debug ABIs were not yet compatible in 3.8, but Victor already made them compatible in 3.8 (python/cpython@f4e4703). Regardless, it's probably not worth trying to get these tests to pass on 3.8.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

1 similar comment
@github-actions

This comment has been minimized.

@hauntsaninja
Copy link
Collaborator Author

hauntsaninja commented Sep 26, 2024

I tried to reproduce the psutil error standalone, but haven't yet been able to. The PyErr_Occurred and LookupError are probably less mysterious. Putting this down for now, will pick it up later.

@github-actions
Copy link
Contributor

According to mypy_primer, this change doesn't affect type check results on a corpus of open source code. ✅

hauntsaninja pushed a commit that referenced this pull request Oct 29, 2024
Taken from
python/cpython@dcda92f

I temporarly disabled some checks due to
#17822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

mypyc runtime tests against debug build don't actually use debug build

3 participants